package com.joysuch.wwyt.bp.repository;

import com.joysuch.wwyt.bp.entity.inspect.BpInspectPlanCheckPoint;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface BpInspectPlanCheckPointRepository extends JpaRepository<BpInspectPlanCheckPoint, Long>, JpaSpecificationExecutor<BpInspectPlanCheckPoint> {

    int deleteByInspectPlanId(Long inspectPlanId);

    List<BpInspectPlanCheckPoint> findByInspectPlanId(Long inspectPlanId);

    BpInspectPlanCheckPoint findOneByInspectPlanIdAndPointId(@Param("inspectPlanId") Long inspectPlanId, @Param("pointId") Long pointId);

    List<BpInspectPlanCheckPoint> findByPointId(Long pointId);


}
